﻿CREATE TABLE [dbo].[Friendship] (
    [Id]       UNIQUEIDENTIFIER NOT NULL,
    [MemberId] UNIQUEIDENTIFIER NOT NULL,
    [FriendId] UNIQUEIDENTIFIER NOT NULL,
    [CreateAt] DATETIME2 (3)    NOT NULL,
    [Approved] BIT              NULL,
    [Status]   INT              NOT NULL,
    CONSTRAINT [PK_Friendship] PRIMARY KEY CLUSTERED ([Id] ASC),
    CONSTRAINT [FK_Friendship_Friend] FOREIGN KEY ([FriendId]) REFERENCES [dbo].[Member] ([Id]),
    CONSTRAINT [FK_Friendship_Member] FOREIGN KEY ([MemberId]) REFERENCES [dbo].[Member] ([Id])
);









